.cart-icon {
  display: none;
  position: absolute;
  right: 0;
  top: 50px;
  width: 57px;
  height: 63px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.5s ease;
}

.cart-icon.shake {
  animation: cartshake 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
  backface-visibility: hidden;
  transform-origin: top right;
}

.cart-icon__inner {
  background: url("/assets/images/icons/cart-icon.svg") center no-repeat;
  background-size: cover;
  position: relative;
  width: 100%;
  height: 100%;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-right: 3px;
}

.cart-icon_visible {
  display: block;
}

.cart-icon__count {
  font-size: 26px;
  line-height: 1.1;
  font-weight: 900;
  color: var(--color-pink);
  margin-top: 16px;
}

.cart-icon__price {
  font-size: 11px;
  line-height: 1.1;
  font-weight: 500;
  color: var(--color-black);
  margin: 0;
}

@keyframes cartshake {
  0% {
    transform: rotate(0);
  }
  15% {
    transform: rotate(5deg);
  }
  30% {
    transform: rotate(-5deg);
  }
  45% {
    transform: rotate(4deg);
  }
  60% {
    transform: rotate(-4deg);
  }
  75% {
    transform: rotate(2deg);
  }
  85% {
    transform: rotate(-2deg);
  }
  92% {
    transform: rotate(1deg);
  }
  100% {
    transform: rotate(0);
  }
}

@media all and (max-width: 767px) {
  .cart-icon {
    position: fixed;
    top: 15px;
    right: 10px;
    transform: none;
    z-index: 95;
  }

  .cart-icon:before {
    content: "";
    position: absolute;
    top: -15px;
    right: -10px;
    border: 55px solid transparent;
    border-right-color: var(--color-pink);
    border-top-color: var(--color-pink);
    z-index: 1;
  }

  .cart-icon__inner {
    position: relative;
    z-index: 2;
  }
}
